home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / spiderweb / src / postscript / ps.spider < prev    next >
Encoding:
Text File  |  1993-04-04  |  2.3 KB  |  78 lines

  1. # Copyright 1989 by David Love, SERC Daresbury Laboratory
  2. # (love@daresbury.ac.uk)
  3. # under the same conditions as the SPIDER distribution.
  4. # For more information, see file COPYRIGHT in the parent directory
  5.  
  6. language PostScript extension ps
  7.  
  8. comment begin <"%"> end newline
  9. macros begin
  10. \def\commentbegin{\%}
  11. \let\&=\\ % don't want bold reserved words (only begin, end, def used anyway)
  12. \def\ps{\sc PostScript}
  13. macros end
  14.  
  15. line begin <"%"> end <"">
  16.  
  17. default translation <*> mathness yes
  18.  
  19. module definition math use math
  20.  
  21. token identifier category math mathness yes
  22. token number category number mathness yes
  23. token newline category newline translation <> mathness maybe
  24. token pseudo_semi category ignore_scrap mathness no translation <opt-0>
  25.  
  26. token [ category open translation <break_space-*>
  27. token ] category close translation <break_space-*>
  28. token { translation <"\\{"> category open
  29. token } translation <"\\}"> category close
  30. token < category open translation <break_space-*>
  31. token > category close translation <break_space-*>
  32. token # category hash translation <"\\#">
  33. # use mathness no here to avoid extra space after /
  34. token / category slash tangleto <space-"/"> mathness no
  35. token = category math
  36. token == category math
  37.  
  38. # a frig to allow user to indent/outdent as required
  39. # => and <= can't be used as PostScript names!
  40. # this would be better done with new WEB control sequences
  41. token => category dent translation <indent> tangleto <"">
  42. token <= category dent translation <outdent> tangleto <"">
  43.  
  44. ilk def_like category def mathness yes
  45. reserved def ilk def_like
  46. ilk begin_like category begin mathness yes
  47. reserved begin ilk begin_like
  48. ilk end_like category end mathness yes
  49. reserved end ilk end_like
  50.  
  51. # index def'd things with underline
  52. slashed_math <break_space> math --> slashed_math 
  53. slashed_math* <break_space> def --> math
  54. [ slashed_math ] (close|end) --> math (close|end)
  55.  
  56. <big_force> newline newline --> ignore_scrap
  57. <force> newline --> ignore_scrap
  58.  
  59. # want indent inside open/close pairs
  60. open <indent> math <outdent> close --> math
  61. # could have empty procedure
  62. open close --> math
  63.  
  64. slash math --> slashed_math
  65.  
  66. number hash number --> math
  67. number --> math
  68. math <break_space> math --> math
  69.  
  70. begin <indent> --> math
  71. <outdent> end --> math
  72.  
  73. dent --> ignore_scrap
  74.  
  75. ignore_scrap math --> math
  76.  
  77. ? ignore_scrap --> #1
  78.